<template>
    <div>
        <el-amap id="amapDemo" :zoom='zoom' :center="center" :amap-manager="amapManager" style="100%;height:600px"></el-amap>
    </div>
</template>

<script>
import Vue from 'vue';
import { fetchData} from '../../api/index';
import VueAMap from 'vue-amap';
import { AMapManager,lazyAMapApiLoaderInstance } from 'vue-amap';

Vue.use(VueAMap);
VueAMap.initAMapApiLoader({
  key: '8a5c21ba8620049bbad7a8aeb9e3f14c',
  plugin: ['AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType','AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.PoiPicker','AMap.Geolocation','AMap.CitySearch','AMap.CitySearch'],
  v: '1.4.4'
});
export default {
    name: 'map',
    data() {
        return {
           
        };
    },
    created() {
        
    },
    mounted(){
        lazyAMapApiLoaderInstance.load().then(() => {
            new AMap.Map('amapDemo', {
                resizeEnable:true,
                zoom:12, //初始化地图层级
            });
        });
    },
    methods: {
        
    }
};
</script>

<style scoped>

</style>
